package com.njit.farm.util;

import java.util.Random;
import java.util.UUID;

/**
 * 有关id的工具类
 * @author sunran
 * @date 19:37 2019/3/20
 */
public class IDUtils {

    private static Random random;

    static {
        random = new Random();
    }

    public static String uuid(){
        return UUID.randomUUID().toString().replaceAll("-", "");
    }


    public static String checkCode(){

        return String.valueOf(1000+random.nextInt(9000));
    }

    public static void main(String[] args) {

        for (int i = 0; i < 100; i++) {
            System.out.println(uuid());
        }

    }
}
